# encoding: utf-8
"""
Redises Modules
=======

Modules enable logical resource separation.

You may control enabled modules by modifying ``ENABLED_MODULES`` config
variable.
"""
from app.extensions.api import api_v1
from .models import Redis


def init_app(app, **kwargs):
    """
    Init redises module.
    """
    import models
    import resources
    api_v1.add_namespace(resources.api)

    from .pipelines import RedisPipelineFactory
    from ..common import pipeline_manager
    pipeline_manager.register_pipeline_factory(RedisPipelineFactory())
    #pipeline_manager.register_pipeline(CleanRedisPipeline('clean_redis'))
